package ua.org.cityid.client.gin;

import net.customware.gwt.presenter.client.DefaultEventBus;
import net.customware.gwt.presenter.client.EventBus;
import net.customware.gwt.presenter.client.gin.AbstractPresenterModule;
import net.customware.gwt.presenter.client.place.PlaceManager;
import ua.org.cityid.client.log.ILog;
import ua.org.cityid.client.log.LogNullAdaptor;
import ua.org.cityid.client.mvp.AppPresenter;
import ua.org.cityid.client.mvp.MainPresenter;
import ua.org.cityid.client.mvp.MainView;

import com.google.inject.Singleton;

public class CityIdClientModule extends AbstractPresenterModule {
	
	public CityIdClientModule(){
		
	}
	
	@Override
	protected void configure() {
		bind(EventBus.class).to(DefaultEventBus.class).in(Singleton.class);
		bind(PlaceManager.class).in(Singleton.class);
		bind(ILog.class).to(LogNullAdaptor.class).in(Singleton.class);
		bind(AppPresenter.class);
		
		bindPresenter(MainPresenter.class, MainPresenter.Display.class, MainView.class);
	}
}
